// JavaScript Document
function toggleLayer( whichLayer )
{
   var chk1 = document.getElementById('chk1');
  var chk2 = document.getElementById('chk2');
  var div1 = document.getElementById('novoucher');
  var div2 = document.getElementById('voucher');
  

  if (whichLayer == 'novoucher')
  {
	  if(chk1.checked == true)
    {
      chk2.checked = false;
      div1.style.display = 'none';
      div2.style.display = 'none';
	 }
	 else if(chk1.checked == false)
    {
      chk2.checked = true;
      div1.style.display = 'none';
      div2.style.display = 'block';
	 }
  }

  else if (whichLayer == 'voucher')
  {
	  if(chk2.checked == true)
  	{ 
      chk1.checked = false;
      div1.style.display = 'none';
      div2.style.display = 'block';
    }
	else if(chk2.checked == false)
  	{ 
      chk1.checked = true;
      div1.style.display = 'none';
      div2.style.display = 'none';
    }
  }
   
}


function toggleLayer2( whichLayer )
{
  var chk3 = document.getElementById('chk3');
  var chk4 = document.getElementById('chk4');
  var chk5 = document.getElementById('chk5');
  var chk6 = document.getElementById('chk6');
  var div1 = document.getElementById('direct');
  var div2 = document.getElementById('bank');
  var div3 = document.getElementById('paypal');
  var div4 = document.getElementById('mobivi');
  if (chk3.checked == false && 
      chk4.checked == false && 
      chk5.checked == false &&
      chk6.checked == false)
  {
    div1.style.display = 'none'
	div2.style.display = 'none'
	div2.style.display = 'none'
	div2.style.display = 'none'
  }    
  else if (whichLayer == 'direct')
	{
		if (chk3.checked == true)
		{  
		  chk4.checked = false;
		  chk5.checked = false;
		  chk6.checked = false;
		  div1.style.display = 'block'
		  div2.style.display = 'none'
		  div3.style.display = 'none'
		  div4.style.display = 'none'
		}
	}
  else if (whichLayer == 'bank')
  {
    if (chk4.checked == true)
		{  
		  chk3.checked = false;
		  chk5.checked = false;
		  chk6.checked = false;
		  div1.style.display = 'none'
		  div2.style.display = 'block'
		  div3.style.display = 'none'
		  div4.style.display = 'none'
		}
  }
  else if (whichLayer == 'paypal')
  {
    if (chk5.checked == true)
		{  
		  chk3.checked = false;
		  chk4.checked = false;
		  chk6.checked = false;
		  div1.style.display = 'none'
		  div2.style.display = 'none'
		  div3.style.display = 'block'
		  div4.style.display = 'none'
		}
  }
	else if (whichLayer == 'mobivi')
	{
		if  (chk6.checked == true)
		{  
		  chk3.checked = false;
		  chk5.checked = false;
		  chk4.checked = false;
		  div1.style.display = 'none'
		  div2.style.display = 'none'
		  div3.style.display = 'none'
		  div4.style.display = 'block'
		}
	}
	 
}
